﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TamGiac
{
    class Diem
    {
        private int _x;

        public int X
        {
            get { return _x; }
            set { _x = value; }
        }
        private int _y;

        public int Y
        {
            get { return _y; }
            set { _y = value; }
        }
        public Diem(int x, int y)
        {
            this._x = x;
            this._y = y;                 
        }
        public double KhoangCach(Diem D)
        {
            return Math.Sqrt((_x - D._x) * (_x - D._x) + (_y - D._y) * (_y - D._y));
        }
    }
}
